
import {env} from '@/utils/env'
import {stringify} from 'qs'
import http from './http'
import type { User } from '@/types/User'
import  { type ResponeData } from '@/types/HttpType'

export const login = async (params: {username:string, password:string}) :Promise<ResponeData<User>>  => {
        return  await http<User>({
            url: env.VITE_HCFL_MRG + '/login',
            method: 'post',
            data: stringify(params),
            // data: params
        })
   
}